home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / ParseException.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  67 lines

  1. /*
  2.  * @(#)ParseException.java    1.5 97/01/20
  3.  *
  4.  * (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
  5.  * (C) Copyright IBM Corp. 1996 - All Rights Reserved
  6.  *
  7.  * Portions copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
  8.  *
  9.  *   The original version of this source code and documentation is copyrighted
  10.  * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
  11.  * materials are provided under terms of a License Agreement between Taligent
  12.  * and Sun. This technology is protected by multiple US and International
  13.  * patents. This notice and attribution to Taligent may not be removed.
  14.  *   Taligent is a registered trademark of Taligent, Inc.
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software
  17.  * and its documentation for NON-COMMERCIAL purposes and without
  18.  * fee is hereby granted provided that this copyright notice
  19.  * appears in all copies. Please refer to the file "copyright.html"
  20.  * for further important copyright and licensing information.
  21.  *
  22.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  23.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  24.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  25.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  26.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  27.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  28.  *
  29.  */
  30.  
  31. package java.text;
  32.  
  33. /**
  34.  * Signals that an error has been has been reached unexpectedly
  35.  * while parsing.
  36.  * @see java.io.Exception
  37.  * @see java.util.Format
  38.  * @see java.util.FieldPosition
  39.  * @version     1.5, 01/20/97
  40.  * @author      Mark Davis
  41.  */
  42. public
  43. class ParseException extends Exception {
  44.  
  45.     /**
  46.      * Constructs a ParseException with the specified detail message and
  47.      * offset.
  48.      * A detail message is a String that describes this particular exception.
  49.      * @param s the detail message
  50.      * @param errorOffset the position where the error is found while parsing.
  51.      */
  52.     public ParseException(String s, int errorOffset) {
  53.         super(s);
  54.         this.errorOffset = errorOffset;
  55.     }
  56.  
  57.     /**
  58.      * Returns the position where the error was found.
  59.      */
  60.     public int getErrorOffset () {
  61.         return errorOffset;
  62.     }
  63.  
  64.     //============ privates ============
  65.     private int errorOffset;
  66. }
  67.